import { defHttp } from "@/utils/http";
import { baseUrlApi } from "./utils";

/** 修改出库单备注 */
export const setOutboundUpdate = <T>(data?: object) => {
  return defHttp.post<T>({
    url: baseUrlApi("/outbound/update"),
    data
  });
};

/** 出库单列表带分页 */
export const getOutboundPagelist = <T>(data?: object) => {
  return defHttp.post<T>({
    url: baseUrlApi("/outbound/pagelist"),
    data
  });
};

/** 出库单详情 */
export const getOutboundDetail = <T>(data?: object) => {
  return defHttp.post<T>({
    url: baseUrlApi("/outbound/detail"),
    data
  });
};

/** 新增出库 */
export const getOutboundAdd = <T>(data?: object) => {
  return defHttp.post<T>({
    url: baseUrlApi("/outbound/add"),
    data
  });
};

/** 查询超领列表 */
export const getOutboundQueryOverReceiveList = <T>(data?: object) => {
  return defHttp.post<T>({
    url: baseUrlApi("/outbound/queryOverReceiveList"),
    data
  });
};

/** 获取物料库存明细 */
export const getOutboundQueryMaterialStock = <T>(data?: object) => {
  return defHttp.post<T>({
    url: baseUrlApi("/outbound/queryMaterialStock"),
    data
  });
};
